package org.jmresler.sakila.batch;

import jakarta.mail.MessagingException;
import lombok.extern.slf4j.Slf4j;
import org.jmresler.sakila.batch.services.EmailService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;

@Slf4j
@SpringBootTest
class BatchApplicationTests {

	@Autowired
	protected EmailService emailService;

	@Value("${spring.mail.properties.path-to-attachment}")
	private String pathToAttachment;

	@Test
	void contextLoads() throws MessagingException {
		emailService.sendMessageWithAttachment(pathToAttachment);
	}

}
